#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back

using namespace std;

typedef pair < int , int > pii;
typedef vector < int > vec;
typedef vector < pii > veg;
typedef long long ll;
typedef double db;

int read() {
    int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch =='-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int mod = 998244353;
const int N = 1010;

int f[N],fac[N],ifac[N];

ll qp(ll x,int t) { ll res = 1; for(;t;t >>= 1,x = x * x % mod) if(t & 1) res = res * x % mod; return res; }

ll C(int x,int y) { return x < 0 || y < 0 || x < y ? 0 : 1ll * fac[x] * ifac[y] % mod * ifac[x - y] % mod; }

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
    f[0] = 1;
    for(int i = (fac[0] = 1);i <= 1000;i++) fac[i] = 1ll * fac[i - 1] * i % mod; ifac[1000] = qp(fac[1000],mod - 2);
    for(int i = 999;i >= 0;i--) ifac[i] = 1ll * ifac[i + 1] * (i + 1) % mod;
    for(int i = 1;i <= 1000;i++) f[i] = 2ll * i * (2 * i - 2) % mod * (f[i - 1] + 2ll * (i - 1) * f[i - 2] % mod) % mod;
    for(int t = in;t;t--) {
	int n = in;
	for(int k = 0;k <= n;k++) printf("%lld\n",C(n,k) * C(n,k) % mod * fac[k] % mod * f[n - k] % mod * qp(2,k) % mod);
    } return 0;
}
